(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[961],{4839:function(e,t,s){Promise.resolve().then(s.bind(s,4454)),Promise.resolve().then(s.t.bind(s,8173,23))},4454:function(e,t,s){"use strict";s.d(t,{ContactSection:function(){return n}});var a=s(7437),l=s(2265);function n(e){var t,s;let{data:n}=e,i=n.form.fields,[d,r]=l.useState(()=>i.reduce((e,t)=>(e[t.id]="",e),{})),[o,c]=l.useState(!1),[m,x]=l.useState(!1),f=e=>t=>{r(s=>({...s,[e]:t.target.value}))};return(0,a.jsxs)("section",{id:"contact",className:"relative bg-[#f3f6fc] py-12 md:py-20",children:[(0,a.jsx)("div",{className:"absolute inset-0 pointer-events-none",children:(0,a.jsx)("div",{className:"h-full w-full bg-[radial-gradient(circle_at_top_left,_rgba(88,133,255,0.08),_transparent_55%)]"})}),(0,a.jsx)("div",{className:"relative mx-auto flex max-w-5xl flex-col gap-10 px-4 md:px-8",children:(0,a.jsxs)("div",{className:"w-full rounded-3xl bg-white p-6 shadow-[0_20px_60px_-25px_rgba(72,99,178,0.35)] md:p-10",children:[(0,a.jsxs)("div",{className:"mb-8 border-b border-[#e1e7f5] pb-8",children:[(0,a.jsx)("p",{className:"text-sm font-medium uppercase tracking-[0.2em] text-[#7090ff]",children:null!==(s=null===(t=n.hero)||void 0===t?void 0:t.title)&&void 0!==s?s:"Business Partnership"}),(0,a.jsx)("h2",{className:"mt-3 text-2xl font-semibold text-[#102052] md:text-[30px]",children:n.form.title}),n.form.description&&(0,a.jsx)("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-[#5c6b91] md:text-base",children:n.form.description}),n.form.note&&(0,a.jsx)("p",{className:"mt-4 rounded-2xl bg-[#f6f8ff] px-4 py-3 text-xs text-[#6b7ba8] md:text-sm",children:n.form.note})]}),(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),c(!0),setTimeout(()=>{c(!1),x(!0)},800)},className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[i.map(e=>{var t,s;let l=e.type?e.type:"text",n=null!==(t=d[e.id])&&void 0!==t?t:"",i="number"==typeof e.maxLength&&e.maxLength>0?"".concat(n.length,"/").concat(e.maxLength):void 0,r="w-full rounded-2xl border border-[#dde5f7] bg-[#f9fbff] px-4 py-3 text-sm text-[#1b2559] placeholder:text-[#9aa7ca] shadow-[0_10px_30px_-20px_rgba(38,71,150,0.45)] transition focus:border-[#4a7dff] focus:bg-white focus:outline-none focus:ring-4 focus:ring-[#4a7dff]/10";return(0,a.jsxs)("div",{className:"flex flex-col gap-2 ".concat("full"===e.span?"md:col-span-2":""),children:[e.label&&(0,a.jsx)("label",{htmlFor:e.id,className:"text-sm font-medium text-[#374570]",children:e.label}),(0,a.jsxs)("div",{className:"relative",children:["textarea"===l?(0,a.jsx)("textarea",{id:e.id,name:e.id,value:n,onChange:f(e.id),placeholder:e.placeholder,maxLength:e.maxLength,rows:6,className:"".concat(r," resize-none md:min-h-[168px]")}):"select"===l?(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("select",{id:e.id,name:e.id,value:n,onChange:f(e.id),className:"".concat(r," appearance-none"),children:[(0,a.jsx)("option",{value:"",disabled:!0,children:e.placeholder}),(null!==(s=e.options)&&void 0!==s?s:[]).map(e=>(0,a.jsx)("option",{value:e,children:e},e))]}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-4 flex items-center text-[#7c8db8]",children:"▾"})]}):(0,a.jsx)("input",{id:e.id,name:e.id,type:l,value:n,onChange:f(e.id),placeholder:e.placeholder,maxLength:e.maxLength,className:r}),i&&(0,a.jsx)("span",{className:"pointer-events-none absolute bottom-3 right-4 text-xs font-medium text-[#8e9ec9]",children:i})]})]},e.id)}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 md:col-span-2 md:flex-row md:items-center md:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-[#7381ab]",children:m?"感谢您的提交!我们将尽快与您联系。":"提交后,我们的商务团队将在一个工作日内回复。"}),(0,a.jsx)("button",{type:"submit",disabled:o,className:"inline-flex items-center justify-center rounded-full bg-[#2f6bff] px-8 py-3 text-sm font-semibold text-white transition hover:bg-[#2556d6] disabled:cursor-not-allowed disabled:opacity-70",children:o?"提交中...":n.form.submit})]})]})]})})]})}}},function(e){e.O(0,[173,971,23,744],function(){return e(e.s=4839)}),_N_E=e.O()}]);